        <include file="Public:top_frame" />
        <!-- /section:basics/navbar.layout -->
        <div class="main-container" id="main-container">
            <script type="text/javascript">
                try {ace.settings.check('main-container' ,'fixed')}catch(e){}
            </script>

            <include file="Public:left_frame" />

            <!-- /section:basics/sidebar -->
            <div class="main-content">
                <div class="main-content-inner">
                    <!-- #section:basics/content.breadcrumbs -->
                    <div class="breadcrumbs" id="breadcrumbs">
                        <script type="text/javascript">
                            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
                        </script>

                        <ul class="breadcrumb">
                            <li>
                                <i class="ace-icon fa fa-home home-icon"></i>
                                <a href="{:U('/index/index')}">首页</a>
                            </li>
                            <li>
                                <a href="{:U('/member/index')}">会员管理</a>
                            </li>
                            <li class="active">会员信息补充</li>
                        </ul><!-- /.breadcrumb -->
                        <!-- /section:basics/content.searchbox -->
                    </div>
                    <div class="page-content">
                        <div class="page-header">
                            <h1>
                                会员补充信息
                            </h1>
                        </div><!-- /.page-header -->
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="widget-box">
                                    <div class="widget-body">
                                        <div class="widget-main">
                                            <!-- #section:plugins/fuelux.wizard -->
                                            <div id="fuelux-wizard-container">
                                                <form class="form-horizontal" id="validation-form" enctype="multipart/form-data" method="post" action="{:U('/member/doSupplement')}"}>
                                                    <input type="hidden" name="member_id" value="{$id}" />
                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="photo">* 头像:</label>
                                                        <div class="col-xs-10 col-sm-1">
                                                            <img src="{$data.photo|showImage}" width="100%"/>
                                                        </div>
                                                        <div class="col-xs-6 col-sm-3">
                                                            <input type="file" name="photo" class="id-input-file"/>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="sex">* 性别:</label>
                                                        <div class="col-xs-12 col-sm-9">
                                                            <div class="radio">
                                                                <label>
                                                                    <if condition="$data.sex eq 0 ">
                                                                        <input type="radio" class="ace" name="sex" value="0" checked>
                                                                    <else />
                                                                        <input type="radio" class="ace" name="sex" value="0">
                                                                    </if>
                                                                    <span class="lbl"> 男</span>
                                                                </label>
                                                                <label>
                                                                    <if condition="$data.sex eq 1 ">
                                                                        <input type="radio" class="ace" name="sex" value="1" checked>
                                                                    <else />
                                                                        <input type="radio" class="ace" name="sex" value="1">
                                                                    </if>
                                                                    <span class="lbl"> 女</span>
                                                                </label>
                                                                <label>
                                                                    <if condition="$data.sex eq 2 ">
                                                                        <input type="radio" class="ace" name="sex" value="2" checked>
                                                                    <else />
                                                                        <input type="radio" class="ace" name="sex" value="2">
                                                                    </if>
                                                                    <span class="lbl"> 不详</span>
                                                                </label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="live_id">* 所在地:</label>
                                                        <div class="col-xs-12 col-sm-6" style="width: 10%;">
                                                            <select class="form-control location1" onchange="changeLocation(this.value,2)" id="location1">
                                                                <if condition="isset($citydata2)" >
                                                                    <foreach name="citylist1" item="vo1" >
                                                                        <if condition="$vo1.id eq $citydata1" >
                                                                            <option value="{$vo1.id}" selected> {$vo1.name} </option>
                                                                        <else />
                                                                            <option value="{$vo1.id}"> {$vo1.name} </option>
                                                                        </if>
                                                                    </foreach>
                                                                <else />
                                                                    <option value="">--请选择--</option>
                                                                    <foreach name="citylist1" item="vo1" >
                                                                        <option value="{$vo1.id}"> {$vo1.name} </option>
                                                                    </foreach>
                                                                </if>
                                                            </select>
                                                        </div>
                                                        <div class="col-xs-12 col-sm-6" style="width: 10%;">
                                                            <select class="form-control location2" id="live_id" name="live_id">
                                                                <if condition="isset($citydata2)" >
                                                                    <foreach name="citylist2" item="vo2" >
                                                                        <if condition="$vo2.id eq $citydata2.id " >
                                                                            <option value="{$vo2.id}" selected> {$vo2.name} </option>
                                                                        <else />
                                                                            <option value="{$vo2.id}"> {$vo2.name} </option>
                                                                        </if>
                                                                    </foreach>
                                                                <else />
                                                                    <option value=""> --请选择-- </option>
                                                                </if>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right">* 个人简介:</label>
                                                        <div class="col-xs-12 col-sm-9">
                                                            <script id="editor" name="content" value="{$content_data}" type="text/plain"></script>
                                                            <script type="text/javascript">
                                                                var ue = UE.getEditor('editor');
                                                                ue.ready(function() {
                                                                    //设置编辑器的内容
                                                                    ue.setContent('{$content_data}');
                                                                });
                                                            </script>
                                                        </div>
                                                    </div>
                                                    <div class="space-8"></div>
                                                </form>
                                            </div>
                                            <div class="clearfix form-actions">
                                                <div class="col-md-offset-3 col-md-9">
                                                    <button class="btn btn-info" type="button" id="member_submit">
                                                        <i class="ace-icon fa fa-check bigger-110"></i>
                                                        提交
                                                    </button>
                                                    &nbsp; &nbsp; &nbsp;
                                                    <button class="btn" type="reset" id="member_back">
                                                        <i class="ace-icon fa fa-undo bigger-110"></i>
                                                        返回
                                                    </button>
                                                </div>
                                            </div>
                                        </div><!-- /.widget-main -->
                                    </div><!-- /.widget-body -->
                                </div><!-- PAGE CONTENT ENDS -->
                            </div>
                        </div><!-- /.row -->
                    </div><!-- /.page-content -->
                </div>
            </div><!-- /.main-content -->
            <include file="Public:footer" />
        </div><!-- /.main-container -->
        <!-- basic scripts -->
        <!--[if !IE]> -->
        <script type="text/javascript">
            window.jQuery || document.write("<script src='__PUBLIC__/admin/assets/js/jquery.js'>"+"<"+"/script>");
        </script>
        <!-- <![endif]-->
        <!--[if IE]>
        <script type="text/javascript">
            window.jQuery || document.write("<script src='__PUBLIC__/admin/assets/js/jquery1x.js'>"+"<"+"/script>");
        </script>
        <![endif]-->
        <script type="text/javascript">
            if('ontouchstart' in document.documentElement) document.write("<script src='__PUBLIC__/admin/assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");
        </script>
        <script src="__PUBLIC__/admin/assets/js/bootstrap.js"></script>

        <!-- page specific plugin scripts -->
        <script src="__PUBLIC__/admin/assets/js/fuelux/fuelux.wizard.js"></script>
        <script src="__PUBLIC__/admin/assets/js/jquery.validate.js"></script>
        <script src="__PUBLIC__/admin/assets/js/additional-methods.js"></script>
        <script src="__PUBLIC__/admin/assets/js/bootbox.js"></script>
        <script src="__PUBLIC__/admin/assets/js/jquery.maskedinput.js"></script>
        <script src="__PUBLIC__/admin/assets/js/select2.js"></script>

        <!-- ace scripts -->
        <script src="__PUBLIC__/admin/assets/js/ace/elements.scroller.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.colorpicker.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.fileinput.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.typeahead.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.wysiwyg.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.spinner.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.treeview.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.wizard.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.aside.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.ajax-content.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.touch-drag.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.sidebar.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.sidebar-scroll-1.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.submenu-hover.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.widget-box.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.settings.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.settings-rtl.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.settings-skin.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.widget-on-reload.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.searchbox-autocomplete.js"></script>

        <!-- inline scripts related to this page -->
        <script type="text/javascript">
            jQuery(function($) {
                $('.nav-list li').removeClass('open').removeClass('active');
                $('#left_7').addClass('open').addClass('active');
                $('#left_7_1').addClass('active');

                //jump to a step
                $('.id-input-file').ace_file_input({
                    no_file:'上传图片',
                    btn_choose:'选择',
                    btn_change:'修改',
                    droppable:false,
                    onchange:null,
                    thumbnail: false, //| true | large
                    whitelist:'gif|png|jpg|jpeg'
                });

				$('#member_back').on('click', function() {
                    history.back();
				});

                $('#member_submit').on('click', function() {

                    // 在这里写校验

                    $('#validation-form').submit();
                });
                /*
                $('#member_submit').on('click', function() {
                    // trim 操作
                    if(!$('#validation-form').valid()) {
                        return;
                    }
                    $.ajax({
                        type: "POST",
                        dataType: "json",
                        data: $("#validation-form").serialize(),
                        async: true,
                        url: "__URL__/doSupplement",
                        success : function(res) {
                            if (res) {
                                if (res.status) {
                                    alert(res.message);
                                    window.location.href = "{:U('member/index')}";
                                } else {
                                    alert(res.message);
                                    return;
                                }
                            } else {
                                alert("添加失败");
                            }
                        },
                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                            alert("网络异常");
                        }
                    });
                });
                */

                //jump to a step
                // $.mask.definitions['~']='[+-]';
                // $('#phone').mask('(999) 999-9999');
                /*
                $('#validation-form').validate({
                    errorElement: 'div',
                    errorClass: 'help-block',
                    focusInvalid: false,
                    ignore: "",
                    rules: {
                        email: {
                            required: true,
                            email:true
                        },
                        username: {
                            required: true
                        },
                        account: {
                            required: true
                        },
                        telephone: {
                            required: true,
                            telephone: 'required'
                        }
                    },
                    messages: {
                        email: {
                            required: "Please provide a valid email.",
                            email: "Please provide a valid email."
                        }
                    },
                    highlight: function (e) {
                        $(e).closest('.form-group').removeClass('has-info').addClass('has-error');
                    },
            
                    success: function (e) {
                        $(e).closest('.form-group').removeClass('has-error');//.addClass('has-info');
                        $(e).remove();
                    },
            
                    errorPlacement: function (error, element) {
                        if(element.is('input[type=checkbox]') || element.is('input[type=radio]')) {
                            var controls = element.closest('div[class*="col-"]');
                            if(controls.find(':checkbox,:radio').length > 1) controls.append(error);
                            else error.insertAfter(element.nextAll('.lbl:eq(0)').eq(0));
                        }
                        else if(element.is('.select2')) {
                            error.insertAfter(element.siblings('[class*="select2-container"]:eq(0)'));
                        }
                        else if(element.is('.chosen-select')) {
                            error.insertAfter(element.siblings('[class*="chosen-container"]:eq(0)'));
                        }
                        else error.insertAfter(element.parent());
                    },
            
                    submitHandler: function (form) {
                    },
                    invalidHandler: function (form) {
                    }
                });
                */
            });

            // 改变图片
            function changeLocation(id, lv) {
                var html = '<option value="">' + ' -- 请选择 -- ' + '</option>';
                if (id == '') {
                    if (lv == 2) {
                        $('.location2').html(html);
                    }
                } else {
                    $.ajax({
                        type: "POST",
                        dataType: "json",
                        data: {
                            id: id,
                            level: lv,
                            model: 'city'
                        },
                        async: true,
                        url: "__URL__/linkage",
                        success : function(res) {
                            if (res && res.status == true) {
                                $.each(res.data, function(k,v) {
                                    html += '<option value='+ v.id +'>'+ v.name +'</option>';
                                });
                                $('.location2').html(html);

                            } else {
                                alert("获取失败");
                            }
                        },
                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                            alert("网络异常")
                        }
                    });
                }
            }
        </script>
    </body>
</html>